<?php
namespace Api\Controller;
use Services\Fenxiao\FenxiaoService;
use Services\Log\LogService;

class LogController extends BaseController
{
    /** @var LogService $logService */
    private $logService;
    public function _initialize()
    {
        $this->logService = new LogService();
    }

    public function upload(){
        $params = file_get_contents('php://input');
        $params = json_decode($params,true);
        $content = arr_get($params,'content');
        $tag = arr_get($params,'tag');
        $this->logService->writeWithDb($content, $tag,'前端日志上报');
        $this->returnSuccess();
    }
}

?>
